package com.xinqi.modules.chat.chat.group.message;

import com.alibaba.fastjson.JSON;
import com.xinqi.common.core.constant.ChatConstants;
import io.rong.messages.BaseMessage;
import io.swagger.v3.oas.annotations.media.Schema;

/**
 * 群组内通知消息
 *
 * @Author：yyzhen
 * @Package：com.xinqi.modules.chat.chat.group.message
 * @Project：xinqi.modules-Cloud-Plus
 * @name：GroupNoticeMessage
 * @Date：2023/6/28 15:49
 * @Filename：GroupNoticeMessage
 */
public class GroupNoticeMessage extends BaseMessage {

    @Schema(description = "operatorUserId")
    private String operatorUserId;

    @Schema(description = "群组中各种通知的操作名称", example = "Create")
    private String operation;

    @Schema(description = "操作数据", example = "{'operatorNickname':'李天','targetGroupName':'群名'}")
    private String data;

    @Schema(description = "消息内容", example = "创建群组")
    private String message;

    @Schema(description = "扩展信息，可以放置任意的数据内容，也可以去掉此属性")
    private String extra;

    @Schema(description = "融云生成群聊ID")
    private String groupId;

    public String getOperatorUserId() {
        return operatorUserId;
    }

    public void setOperatorUserId(String operatorUserId) {
        this.operatorUserId = operatorUserId;
    }

    public String getOperation() {
        return operation;
    }

    public void setOperation(String operation) {
        this.operation = operation;
    }

    public String getData() {
        return data;
    }

    public void setData(String data) {
        this.data = data;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getExtra() {
        return extra;
    }

    public void setExtra(String extra) {
        this.extra = extra;
    }

    public void setGroupId(String groupId) {
        this.groupId = groupId;
    }

    public String getGroupId() {
        return groupId;
    }

    @Override
    public String getType() {
        return ChatConstants.CHAT_GROUP_NOTICE_OBJECT_NAME;
    }

    @Override
    public String toString() {
        return JSON.toJSONString(this);
    }
}
